package net.ght.bishe.bishe.mapper;

import net.ght.bishe.bishe.entity.User;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
/*开启二级缓存*/
@CacheNamespace
public interface UserMapper {

    @Select("select * from user")
    List<User> getList();

    @Insert("insert into user(id,name,password)values(#{id},#{name},#{password})")
    int save(User user);
}

